<template>
    <div>
      <div class="title-text">周末去哪儿</div>
      <ul>
        <li v-for="obj in weekendlist" :key="obj.id">
          <div class="item-img-wapper">
            <img class="item-img" :src="obj.imgUrl">
          </div>

          <div class="item-info">
            <p class="item-title">{{obj.title}}</p>
            <p class="item-desc">{{obj.desc}}</p>
          </div>
        </li>
      </ul>
    </div>
</template>

<script>
export default {
  name: 'Weekend',
  props: {
    weekendlist: Array
  }
}
</script>

<style lang="stylus" scoped>
  .title-text {
    line-height: .6rem;
    padding-left: .2rem;
  }
  .item-img-wapper {
    height: 0;
    overflow: hidden;
    padding-bottom: 36%;
  }
  .item-img {
    width: 100%;
  }
  .item-info {
    padding: 0.1rem;
    flex: 1;
  }
  .item-title {
    padding-bottom: 0.1rem;
  }
  .item-desc {
    line-height: .5rem;
    height: .5rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
</style>
